package ar.edu.unicen.pladema.vc1.formats.sur;

import java.io.IOException;

public class SUR {
	public static Data3D read(String file) throws IOException {
		SURToken surToken = new SURToken(file);
		IReader iReader = new DefaultReader();
		Data3D data3d = new Data3D();
		while (surToken.hasNext()) {
			String token = surToken.next();
			iReader = iReader.readed(token, data3d);
		}
		surToken.close();
		data3d.compile();
		return data3d;
	}
	public static void main(final String [] args) {
		
		String file = "/home/apps/desarrollo/workspace-vc1/VC1/src/main/resources/sur/esfera.sur";
		try {
			read(file).printTriangles();
		} catch (IOException e1) {
			// TODO Auto-generated catch block
			e1.printStackTrace();
		}
	}
}
